// 导入自己封装的axios实例对象
import request from '@/utiles/request'

// 获取频道信息
export const getChannel = () => {
    return request({
        url: '/v1_0/user/channels',
    })
}

// 获取全部频道信息
export const getAllChannel = () => {
    return request({
        url: '/v1_0/channels'
    })
}

// 保存修改我的频道记录
export const saveMyChannel = data => {
    return request({
        url: '/v1_0/user/channels',
        method: 'PATCH',
        data: data
    })
}

// 删除我的频道记录
export const deleteMyChannel = id => {
    return request({
        url: '/v1_0/user/channels/' + id,
        method: 'DELETE',
    })
}